<include file="public@header"/>
</head>
<body>
<div class="layui-fluid js-check-wrap">
    <form method="post" class="js-ajax-form" action="{:url('LinkCategory/listOrder')}">
        <div class="layui-card">
            <div class="layui-card-header well">
                <div class="layui-col-xs6">
                    <h3>{:lang('ADMIN_LINKCATEGORY_INDEX')}</h3>
                </div>
                <div class="layui-col-xs6 text-right">
                    <!-- 添加分类 -->
                    <a href="{:url('LinkCategory/add')}" class="layui-btn layui-btn-normal">{:lang('ADD_CATEGORY')}</a>
                    <!-- 保存排序 -->
                    <button type="submit" class="layui-btn layui-btn-warm js-ajax-submit">{:lang('SAVE_SORT')}</button>
                </div>
            </div>
        
            <div class="layui-card-body">
                <table class="layui-table">
                    <thead>
                    <tr>
                        <!-- <th width="16"><input type="checkbox" class="js-check-all" data-direction="x"
                                                     data-checklist="js-check-x"></th> -->
                        <th class="text-center" width="65">{:lang('SORT')}</th>
                        <th>ID</th>
                        <th>{:lang('CATEGORY_NAME')}</th>
                        <th>{:lang('DISPLAY_HIDE')}</th>
                        <th width="100">{:lang('ACTIONS')}</th>
                    </tr>
                    </thead>
                    <tbody>
                    <foreach name="links" item="vo">
                        <tr>
                            <!-- <td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
                                       value="{$vo.cat_id}"></td> -->
                           <td ><input name='list_orders[{$vo.cat_id}]' type='text' size='3' value='{$vo.list_order}' class='input-order'></td>
                            <td>{$vo.cat_id}</td>
                            <!-- 名称 -->
                            <td>{$vo.cat_name}</td>
                            <td>
                                <notempty name="vo.status">
                                    <span class="layui-btn layui-btn-normal layui-btn-xs">{:lang('DISPLAY')}</span>
                                    <else/>
                                    <span class="layui-btn layui-btn-xs layui-btn-danger">{:lang('HIDE')}</span>
                                </notempty>
                            </td>
                            <td>
                                <a class="layui-btn layui-btn-xs" href="{:url('LinkCategory/edit',array('id'=>$vo['cat_id']))}">{:lang('EDIT')}</a>
                                <a href="{:url('LinkCategory/delete',array('id'=>$vo['cat_id']))}" class="layui-btn layui-btn-danger layui-btn-xs js-ajax-delete">
                                    {:lang('DELETE')}
                                </a>
                            </td>
                        </tr>
                    </foreach>
                    </tbody>
                </table>
            </div>
        </div>
    </form>
</div>
<include file="public@footer"/>
